Optimal. Leaf size=220 \[ -\frac {4 a b^3 \cos ^5(c+d x)}{5 d}-\frac {4 a^3 b \cos ^7(c+d x)}{7 d}+\frac {4 a b^3 \cos ^7(c+d x)}{7 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}+\frac {3 a^4 \sin ^5(c+d x)}{5 d}-\frac {12 a^2 b^2 \sin ^5(c+d x)}{5 d}+\frac {b^4 \sin ^5(c+d x)}{5 d}-\frac {a^4 \sin ^7(c+d x)}{7 d}+\frac {6 a^2 b^2 \sin ^7(c+d x)}{7 d}-\frac {b^4 \sin ^7(c+d x)}{7 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.16, antiderivative size = 220, normalized size of antiderivative = 1.00, number of steps
used = 15, number of rules used = 7, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3169, 2713,
2645, 30, 2644, 276, 14} \begin {gather*} -\frac {a^4 \sin ^7(c+d x)}{7 d}+\frac {3 a^4 \sin ^5(c+d x)}{5 d}-\frac {a^4 \sin ^3(c+d x)}{d}+\frac {a^4 \sin (c+d x)}{d}-\frac {4 a^3 b \cos ^7(c+d x)}{7 d}+\frac {6 a^2 b^2 \sin ^7(c+d x)}{7 d}-\frac {12 a^2 b^2 \sin ^5(c+d x)}{5 d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}+\frac {4 a b^3 \cos ^7(c+d x)}{7 d}-\frac {4 a b^3 \cos ^5(c+d x)}{5 d}-\frac {b^4 \sin ^7(c+d x)}{7 d}+\frac {b^4 \sin ^5(c+d x)}{5 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 30
Rule 276
Rule 2644
Rule 2645
Rule 2713
Rule 3169
Rubi steps
\begin {align*} \int \cos ^3(c+d x) (a \cos (c+d x)+b \sin (c+d x))^4 \, dx &=\int \left (a^4 \cos ^7(c+d x)+4 a^3 b \cos ^6(c+d x) \sin (c+d x)+6 a^2 b^2 \cos ^5(c+d x) \sin ^2(c+d x)+4 a b^3 \cos ^4(c+d x) \sin ^3(c+d x)+b^4 \cos ^3(c+d x) \sin ^4(c+d x)\right ) \, dx\\ &=a^4 \int \cos ^7(c+d x) \, dx+\left (4 a^3 b\right ) \int \cos ^6(c+d x) \sin (c+d x) \, dx+\left (6 a^2 b^2\right ) \int \cos ^5(c+d x) \sin ^2(c+d x) \, dx+\left (4 a b^3\right ) \int \cos ^4(c+d x) \sin ^3(c+d x) \, dx+b^4 \int \cos ^3(c+d x) \sin ^4(c+d x) \, dx\\ &=-\frac {a^4 \text {Subst}\left (\int \left (1-3 x^2+3 x^4-x^6\right ) \, dx,x,-\sin (c+d x)\right )}{d}-\frac {\left (4 a^3 b\right ) \text {Subst}\left (\int x^6 \, dx,x,\cos (c+d x)\right )}{d}+\frac {\left (6 a^2 b^2\right ) \text {Subst}\left (\int x^2 \left (1-x^2\right )^2 \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (4 a b^3\right ) \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac {b^4 \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {4 a^3 b \cos ^7(c+d x)}{7 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{d}+\frac {3 a^4 \sin ^5(c+d x)}{5 d}-\frac {a^4 \sin ^7(c+d x)}{7 d}+\frac {\left (6 a^2 b^2\right ) \text {Subst}\left (\int \left (x^2-2 x^4+x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}-\frac {\left (4 a b^3\right ) \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (c+d x)\right )}{d}+\frac {b^4 \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\sin (c+d x)\right )}{d}\\ &=-\frac {4 a b^3 \cos ^5(c+d x)}{5 d}-\frac {4 a^3 b \cos ^7(c+d x)}{7 d}+\frac {4 a b^3 \cos ^7(c+d x)}{7 d}+\frac {a^4 \sin (c+d x)}{d}-\frac {a^4 \sin ^3(c+d x)}{d}+\frac {2 a^2 b^2 \sin ^3(c+d x)}{d}+\frac {3 a^4 \sin ^5(c+d x)}{5 d}-\frac {12 a^2 b^2 \sin ^5(c+d x)}{5 d}+\frac {b^4 \sin ^5(c+d x)}{5 d}-\frac {a^4 \sin ^7(c+d x)}{7 d}+\frac {6 a^2 b^2 \sin ^7(c+d x)}{7 d}-\frac {b^4 \sin ^7(c+d x)}{7 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.54, size = 204, normalized size = 0.93 \begin {gather*} \frac {-140 a b \left (5 a^2+3 b^2\right ) \cos (c+d x)-140 a b \left (3 a^2+b^2\right ) \cos (3 (c+d x))-28 a b \left (5 a^2-b^2\right ) \cos (5 (c+d x))-20 a b \left (a^2-b^2\right ) \cos (7 (c+d x))+35 \left (35 a^4+30 a^2 b^2+3 b^4\right ) \sin (c+d x)+35 \left (7 a^4-2 a^2 b^2-b^4\right ) \sin (3 (c+d x))+7 \left (7 a^4-18 a^2 b^2-b^4\right ) \sin (5 (c+d x))+5 \left (a^4-6 a^2 b^2+b^4\right ) \sin (7 (c+d x))}{2240 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 206, normalized size = 0.94
method | result | size |
derivativedivides | \(\frac {b^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )+4 a \,b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )+6 a^{2} b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 a^{3} b \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(206\) |
default | \(\frac {b^{4} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{4}\left (d x +c \right )\right )}{7}-\frac {3 \sin \left (d x +c \right ) \left (\cos ^{4}\left (d x +c \right )\right )}{35}+\frac {\left (2+\cos ^{2}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{35}\right )+4 a \,b^{3} \left (-\frac {\left (\sin ^{2}\left (d x +c \right )\right ) \left (\cos ^{5}\left (d x +c \right )\right )}{7}-\frac {2 \left (\cos ^{5}\left (d x +c \right )\right )}{35}\right )+6 a^{2} b^{2} \left (-\frac {\sin \left (d x +c \right ) \left (\cos ^{6}\left (d x +c \right )\right )}{7}+\frac {\left (\frac {8}{3}+\cos ^{4}\left (d x +c \right )+\frac {4 \left (\cos ^{2}\left (d x +c \right )\right )}{3}\right ) \sin \left (d x +c \right )}{35}\right )-\frac {4 a^{3} b \left (\cos ^{7}\left (d x +c \right )\right )}{7}+\frac {a^{4} \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\) | \(206\) |
risch | \(-\frac {5 a^{3} b \cos \left (d x +c \right )}{16 d}-\frac {3 a \,b^{3} \cos \left (d x +c \right )}{16 d}+\frac {35 a^{4} \sin \left (d x +c \right )}{64 d}+\frac {15 a^{2} b^{2} \sin \left (d x +c \right )}{32 d}+\frac {3 b^{4} \sin \left (d x +c \right )}{64 d}-\frac {a^{3} b \cos \left (7 d x +7 c \right )}{112 d}+\frac {a \,b^{3} \cos \left (7 d x +7 c \right )}{112 d}+\frac {\sin \left (7 d x +7 c \right ) a^{4}}{448 d}-\frac {3 \sin \left (7 d x +7 c \right ) a^{2} b^{2}}{224 d}+\frac {\sin \left (7 d x +7 c \right ) b^{4}}{448 d}-\frac {a^{3} b \cos \left (5 d x +5 c \right )}{16 d}+\frac {a \,b^{3} \cos \left (5 d x +5 c \right )}{80 d}+\frac {7 \sin \left (5 d x +5 c \right ) a^{4}}{320 d}-\frac {9 \sin \left (5 d x +5 c \right ) a^{2} b^{2}}{160 d}-\frac {\sin \left (5 d x +5 c \right ) b^{4}}{320 d}-\frac {3 a^{3} b \cos \left (3 d x +3 c \right )}{16 d}-\frac {a \,b^{3} \cos \left (3 d x +3 c \right )}{16 d}+\frac {7 \sin \left (3 d x +3 c \right ) a^{4}}{64 d}-\frac {\sin \left (3 d x +3 c \right ) a^{2} b^{2}}{32 d}-\frac {\sin \left (3 d x +3 c \right ) b^{4}}{64 d}\) | \(347\) |
norman | \(\frac {-\frac {40 a^{3} b +16 a \,b^{3}}{35 d}+\frac {2 a^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 a^{4} \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {16 a \,b^{3} \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}-\frac {16 a \,b^{3} \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {32 a \,b^{3} \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {8 a^{3} b \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {2 \left (43 a^{4}-32 a^{2} b^{2}+16 b^{4}\right ) \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {2 \left (43 a^{4}-32 a^{2} b^{2}+16 b^{4}\right ) \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {8 \left (53 a^{4}+228 a^{2} b^{2}-24 b^{4}\right ) \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{35 d}-\frac {\left (40 a^{3} b -16 a \,b^{3}\right ) \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}-\frac {\left (120 a^{3} b -32 a \,b^{3}\right ) \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{5 d}+\frac {4 a^{2} \left (a^{2}+4 b^{2}\right ) \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {4 a^{2} \left (a^{2}+4 b^{2}\right ) \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{7}}\) | \(371\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.29, size = 154, normalized size = 0.70 \begin {gather*} -\frac {20 \, a^{3} b \cos \left (d x + c\right )^{7} + {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} a^{4} - 2 \, {\left (15 \, \sin \left (d x + c\right )^{7} - 42 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3}\right )} a^{2} b^{2} - 4 \, {\left (5 \, \cos \left (d x + c\right )^{7} - 7 \, \cos \left (d x + c\right )^{5}\right )} a b^{3} + {\left (5 \, \sin \left (d x + c\right )^{7} - 7 \, \sin \left (d x + c\right )^{5}\right )} b^{4}}{35 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.47, size = 149, normalized size = 0.68 \begin {gather*} -\frac {28 \, a b^{3} \cos \left (d x + c\right )^{5} + 20 \, {\left (a^{3} b - a b^{3}\right )} \cos \left (d x + c\right )^{7} - {\left (5 \, {\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{6} + 2 \, {\left (3 \, a^{4} + 3 \, a^{2} b^{2} - 4 \, b^{4}\right )} \cos \left (d x + c\right )^{4} + 16 \, a^{4} + 16 \, a^{2} b^{2} + 2 \, b^{4} + {\left (8 \, a^{4} + 8 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{35 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.65, size = 286, normalized size = 1.30 \begin {gather*} \begin {cases} \frac {16 a^{4} \sin ^{7}{\left (c + d x \right )}}{35 d} + \frac {8 a^{4} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{5 d} + \frac {2 a^{4} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} + \frac {a^{4} \sin {\left (c + d x \right )} \cos ^{6}{\left (c + d x \right )}}{d} - \frac {4 a^{3} b \cos ^{7}{\left (c + d x \right )}}{7 d} + \frac {16 a^{2} b^{2} \sin ^{7}{\left (c + d x \right )}}{35 d} + \frac {8 a^{2} b^{2} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{5 d} + \frac {2 a^{2} b^{2} \sin ^{3}{\left (c + d x \right )} \cos ^{4}{\left (c + d x \right )}}{d} - \frac {4 a b^{3} \sin ^{2}{\left (c + d x \right )} \cos ^{5}{\left (c + d x \right )}}{5 d} - \frac {8 a b^{3} \cos ^{7}{\left (c + d x \right )}}{35 d} + \frac {2 b^{4} \sin ^{7}{\left (c + d x \right )}}{35 d} + \frac {b^{4} \sin ^{5}{\left (c + d x \right )} \cos ^{2}{\left (c + d x \right )}}{5 d} & \text {for}\: d \neq 0 \\x \left (a \cos {\left (c \right )} + b \sin {\left (c \right )}\right )^{4} \cos ^{3}{\left (c \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.58, size = 229, normalized size = 1.04 \begin {gather*} -\frac {{\left (a^{3} b - a b^{3}\right )} \cos \left (7 \, d x + 7 \, c\right )}{112 \, d} - \frac {{\left (5 \, a^{3} b - a b^{3}\right )} \cos \left (5 \, d x + 5 \, c\right )}{80 \, d} - \frac {{\left (3 \, a^{3} b + a b^{3}\right )} \cos \left (3 \, d x + 3 \, c\right )}{16 \, d} - \frac {{\left (5 \, a^{3} b + 3 \, a b^{3}\right )} \cos \left (d x + c\right )}{16 \, d} + \frac {{\left (a^{4} - 6 \, a^{2} b^{2} + b^{4}\right )} \sin \left (7 \, d x + 7 \, c\right )}{448 \, d} + \frac {{\left (7 \, a^{4} - 18 \, a^{2} b^{2} - b^{4}\right )} \sin \left (5 \, d x + 5 \, c\right )}{320 \, d} + \frac {{\left (7 \, a^{4} - 2 \, a^{2} b^{2} - b^{4}\right )} \sin \left (3 \, d x + 3 \, c\right )}{64 \, d} + \frac {{\left (35 \, a^{4} + 30 \, a^{2} b^{2} + 3 \, b^{4}\right )} \sin \left (d x + c\right )}{64 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.28, size = 291, normalized size = 1.32 \begin {gather*} -\frac {\frac {b^4\,\sin \left (3\,c+3\,d\,x\right )}{64}-\frac {3\,b^4\,\sin \left (c+d\,x\right )}{64}-\frac {7\,a^4\,\sin \left (3\,c+3\,d\,x\right )}{64}-\frac {7\,a^4\,\sin \left (5\,c+5\,d\,x\right )}{320}-\frac {a^4\,\sin \left (7\,c+7\,d\,x\right )}{448}-\frac {35\,a^4\,\sin \left (c+d\,x\right )}{64}+\frac {b^4\,\sin \left (5\,c+5\,d\,x\right )}{320}-\frac {b^4\,\sin \left (7\,c+7\,d\,x\right )}{448}+\frac {a\,b^3\,\cos \left (3\,c+3\,d\,x\right )}{16}+\frac {3\,a^3\,b\,\cos \left (3\,c+3\,d\,x\right )}{16}-\frac {a\,b^3\,\cos \left (5\,c+5\,d\,x\right )}{80}+\frac {a^3\,b\,\cos \left (5\,c+5\,d\,x\right )}{16}-\frac {a\,b^3\,\cos \left (7\,c+7\,d\,x\right )}{112}+\frac {a^3\,b\,\cos \left (7\,c+7\,d\,x\right )}{112}-\frac {15\,a^2\,b^2\,\sin \left (c+d\,x\right )}{32}+\frac {a^2\,b^2\,\sin \left (3\,c+3\,d\,x\right )}{32}+\frac {9\,a^2\,b^2\,\sin \left (5\,c+5\,d\,x\right )}{160}+\frac {3\,a^2\,b^2\,\sin \left (7\,c+7\,d\,x\right )}{224}+\frac {3\,a\,b^3\,\cos \left (c+d\,x\right )}{16}+\frac {5\,a^3\,b\,\cos \left (c+d\,x\right )}{16}}{d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________